package cn.edu.ujn.food.dao;

import cn.edu.ujn.food.entity.Coupon;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.Pageable;
import java.util.List;
@Mapper
public interface CouponDao {

    Coupon queryById(Integer couponId);

    List<Coupon> queryAllByLimit(Coupon coupon, @Param("pageable") Pageable pageable);

    long count(Coupon coupon);

    int insert(Coupon coupon);

    int insertBatch(@Param("entities") List<Coupon> entities);

    int insertOrUpdateBatch(@Param("entities") List<Coupon> entities);

    int update(Coupon coupon);

    int deleteById(Integer couponId);

    List<Coupon> selectAll(Coupon coupon);

    Integer selectCount();

    List<Coupon> findAll();
}

